package zh.dummy.netty.client.context;

import java.util.HashSet;
import java.util.Set;

import zh.dummy.netty.client.context.listener.WorkflowListener;

public class ListenerManager {
	
	private Set<WorkflowListener> listeners;
	
	public ListenerManager(){
		listeners = new HashSet<WorkflowListener>();
	}
	
	public void addListeners(Set<WorkflowListener> listeners){
		if(listeners != null){
			return;
		}
		this.listeners.addAll(listeners);
	}
	
	public Set<WorkflowListener> getListeners(){
		return listeners;
	}
	
	public void addListener(WorkflowListener listener){
		if(listener == null){
			return;
		}
		listeners.add(listener);
	}
}
